Pass multiples --test-args to the tester
authorMarco A L Barbosa <malbarbo@gmail.com>
Mon, 13 Feb 2017 17:34:29 +0000 (15:34 -0200)
committerMarco A L Barbosa <malbarbo@gmail.com>
Mon, 13 Feb 2017 17:34:29 +0000 (15:34 -0200)
Like --cfg, --test-args accept multiple matches, we should use it and
avoid some unexpected behavior joinning the arguments with space.

src/cargo/ops/cargo_test.rs

index 6c267efb60b033193e74d704da76a501b63ab086..a7a4504d35311a9a7f6305b575e3650f20b976a9 100644 (file)
@@ -141,8 +141,8 @@ fn run_doc_tests(options: &TestOptions,
                 p.arg("-L").arg(native_dep);
             }
 
-            if test_args.len() > 0 {
-                p.arg("--test-args").arg(&test_args.join(" "));
+            for arg in test_args {
+                p.arg("--test-args").arg(arg);
             }
 
             if let Some(cfgs) = compilation.cfgs.get(&package.package_id()) {